<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSettingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('settings', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('mall_id')->unique()->comment('租户ID');
            $table->string('foot_puid')->index()->comment('芯迈合作编码');
            $table->string('wx_appid')->comment('公众号APPID');
            $table->string('wx_appsecret')->comment('公众号APPSECRET');
            $table->string('wx_token')->default('')->comment('公众号令牌(Token)');
            $table->string('wx_sea_key')->default('')->comment('公众号消息加解密密钥(EncodingAESKey)');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('settings');
    }
}
